package com.cncytech.uiautomator_demo.testcase;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.is;

import com.cncytech.uiautomator_demo.BaseTest;
import com.cncytech.uiautomator_demo.TestConstant;
import com.cncytech.uiautomator_demo.RetryWatcher;
import com.cncytech.uiautomator_demo.utils.Describe;

import org.junit.Rule;
import org.junit.Test;

/**
 * usb数据传输测试
 */
public class UsbDataPoliciesTest extends BaseTest {
    @Rule
    public RetryWatcher retryWatcher = new RetryWatcher(TestConstant.retryCount);

   // @Test
    @Describe(TestConstant.USB_FORBIDDEN)
    public void UsbForbiddentTest(){
        String msg = TestConstant.USB_FORBIDDEN+ TestConstant.FAILURE;
        int status = 0;
        assertThat(msg,hmm.setUsbDataPolicies(status));
        int usbDataPolicies = hmm.getUsbDataPolicies();
        assertThat(msg,usbDataPolicies,is(status));
    }

   // @Test
    @Describe(TestConstant.USB_CUSTOM)
    public void UsbCustomTest(){
        String msg = TestConstant.USB_CUSTOM+ TestConstant.FAILURE;
        int status = 1;
        assertThat(msg,hmm.setUsbDataPolicies(status));
        int usbDataPolicies = hmm.getUsbDataPolicies();
        assertThat(msg,usbDataPolicies,is(status));
    }
}
